package com.gao.mq.handler.factory;

import com.gao.mq.handler.IMessageHandler;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Set;

/**
 * 消息处理简单工厂
 */
@Service
public class MessageHandlerFactory extends MessageHandlerConfig {

    public IMessageHandler getMessageHandler(Integer msgNoticeCode) {
        return handlerMap.get(msgNoticeCode);
    }

    public Set<Integer> msgCodeSet() {
        return handlerMap.keySet();
    }
}
